package io.github.mosiki.service.impl;

import io.github.mosiki.dao.UserDao;
import io.github.mosiki.entity.User;
import io.github.mosiki.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.beans.Transient;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User findById(Integer id) {
        return userDao.findById(id);
    }

    @Override
    @Transient
    public int update(User user) {
//        int i = 2/0;
        return userDao.update(user);
    }
}
